<?php
require_once "E:/php_project/php_demo/tushare/common/http.php";
require_once "E:/php_project/php_demo/tushare/common/mysql.php";
set_time_limit(0);
$conn = new MysqlCommon();
$stockRes = $conn->select("SELECT * FROM tushare.stock_basic");

foreach ($stockRes as $stockResItem){
    $ts_code = $stockResItem["ts_code"];

    $dailyData = $conn->select("SELECT max(close ) as max_close,min(close ) as min_close FROM tushare.daily WHERE ts_code = '{$ts_code}'");
    $dailyDataAll = $conn->select("SELECT * FROM tushare.daily WHERE ts_code = '{$ts_code}'");
    $c = count($dailyData);
    if($dailyData[0]["max_close"] - $dailyData[0]["min_close"] < 15){
        continue;
    }
    if($dailyDataAll[0]["close"] > $dailyDataAll[$c-1]["close"]){
        continue;
    }
    echo $ts_code.PHP_EOL;




}
exit(0);
